﻿package com.saint.elasticity.tests 
{
	import com.saint.elasticity.ElasticGridManager;
	import com.saint.elasticity.FixedAnchorPoint;
	import com.saint.elasticity.ElasticObject;
	import com.saint.elasticity.IAnchorPoint;
	import com.saint.utils.Logger;
	import flash.display.Sprite;
	import flash.display.Stage;
	import flash.events.Event;
	import flash.events.EventDispatcher;
	import flash.geom.Point;
	/**
	 * ...
	 * @author kembera
	 */
	public class ElasticityTest extends EventDispatcher
	{
		private var springStrength:Number = 0.1;
		private var _buttons:Array = new Array();
		private var scope:Stage;
		
		private var elasticGridManager:ElasticGridManager;
		
		var gridHolder:Sprite = new Sprite();
		
		public function ElasticityTest(scope:Stage) 
		{
			Logger.info("ElasticityTest.ElasticityTest");
			
			this.scope = scope;
			
			
			scope.addChild(gridHolder);
			gridHolder.x = 20;
			gridHolder.y = 40;			
			elasticGridManager = new ElasticGridManager(gridHolder);
			
			/* create the crid */
			elasticGridManager.createElasticGrid(2, 2);			
			
		}
		
		public function enterFrameEvent(e:Event):void 
		{
			//Logger.info("ElasticityTest..enterFrameEvent");
			elasticGridManager.doElasticity();
		}
		
		

	
		
		
		
		
	
		
		
	}

}